package com.yzd.learnjava.typeinfo;

import com.yzd.learnjava.util.Print;

public class InterfaceViolation {
	public static void main(String[] args) {
		A a = new B();
		a.f();
		Print.print(a.getClass().getSimpleName());
		if(a instanceof B) {
			B b = (B)a;
			b.g();
		}
	}
}

class B implements A{
	public void f() {}
	public void g() {}
}
